import 'package:amway_superapp_creator_plugin/config/colors_config.dart';
import 'package:amway_superapp_creator_plugin/routers/application.dart';
import 'package:amway_superapp_creator_plugin/viewmodels/home/home_guide_list_viewmodel.dart';
import 'package:amway_superapp_creator_plugin/views/base_view.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'guide_list_widget.dart';

class HomeGuideListPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return BaseView<HomeGuideListViewModel>(
      model: HomeGuideListViewModel(api: Provider.of(context)),
      onModelReady: (model) async {},
      builder: (context, model, child) => Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.white,
          leading: IconButton(
            icon: Icon(
              Icons.arrow_back_ios,
              color: Colors.black,
              size: 24,
            ),
            onPressed: () => Application.router.pop(context),
          ),
          title: Text(
            "创玩小站使用指南",
            style: TextStyle(fontSize: 20, color: ColorsConfig.c_2c2c2c),
          ),
          centerTitle: true,
          elevation: 0,
        ),
        body: Container(
          child: GuideListWidget(true),
        ),
      ),
    );
  }
}
